package com.apollow.oschina.protocol;

import com.apollow.oschina.base.BaseProtocol;
import com.apollow.oschina.bean.GeneralBlogBean;
import com.apollow.oschina.bean.GeneralBlogDetailBean;

import retrofit2.Call;

/**
 * Created by Administrator on 2017/1/15.
 * 项目名:    OsChina
 * 包名:      com.apollow.oschina.protocol
 * 文件名:    BlogProtocol
 * 创建者:    LXF
 * 创建时间:   ${DATA}14:50
 * 描述:     TODO
 */

public class BlogProtocol  extends BaseProtocol<GeneralBlogBean>{
    String pageIndex;
    @Override
    protected Call<GeneralBlogBean> getCall(String... parms) {
        return mService.getBlogInfo(parms[0],"20","latest");
    }
    // TODO: 2017/1/17 传入Id获取博客详情中的内容;
    public GeneralBlogDetailBean getBlogDetail(String id){
        BlogDetailProtocol protocol = new BlogDetailProtocol();
        protocol.setId(id);
        GeneralBlogDetailBean data = protocol.getData();
        return data;
    }
    public void setPageIndex(String pageIndex) {
        this.pageIndex = pageIndex;
    }
}
